Skip to content

Addition of Special Abilities#8

Merged
ScottWilson0903 merged 9 commits into
InscryptionModding:mainfrom
julian-perge:feature/special_abilities_patchv1
Nov 18, 2021
Merged

Addition of Special Abilities#8
ScottWilson0903 merged 9 commits into
InscryptionModding:mainfrom
julian-perge:feature/special_abilities_patchv1

Conversation

@julian-perge
Copy link
Copy Markdown
Contributor

No description provided.

Added rulebook patching for special abilities
Added SpecialAbilityIdentifier.cs
Refactored StatIconInfo.cs to now point at LoadAbilityData
Refactored to now check if the ability already exists.
Added Card_AttachAbilities_NewSpecialAbilities.cs to add SpecialAbilities.
Cleaned up AbilitiesUtil.cs and AbilityIdentifier.cs
Refactored CustomCard to include special abilities now
Comment thread Models/NewSpecialAbility.cs Outdated
public SpecialAbilityIdentifier id;

public NewSpecialAbility(
StatIconInfo statIconInfo,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statIconInfo is optional, so should be nullable here

Comment thread Patches/CardTriggerHandler.cs
NewSpecialAbility newAbility = NewSpecialAbility.specialAbilities
.Find(x => x.specialTriggeredAbility == specialTriggeredAbility);
Type type = newAbility.abilityBehaviour;
Plugin.Log.LogInfo($"-> Type is [{type}]");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably wants more information or wants to be a debug message

Comment thread Patches/Rulebook.cs Outdated
min,
doAddPageFunc,
__instance.FillStatIconPage,
Localization.Translate("APPENDIX XII, SUBSECTION I - MOD SPEC. ABILITIES {0}")));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPENDIX XII, SUBSECTION II - VARIABLE STATS {0}

Comment thread Utils/IdentifierHandlers.cs Outdated
{
NewCard.cards[item.Key].abilities.Add(id.id);
// if the card already has the ability then no point and adding it
if (!newCard.abilities.Contains(id.id)) newCard.abilities.Add(id.id);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some abilities can stack. If you try to add a duplicate which can't stack, then it will be removed, but certain abilitiies stack

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fix for toRemove does need to be added to make this work as intended but I have the code for that and will add it after I merge

Comment thread Utils/IdentifierHandlers.cs Outdated
{
CustomCard.cards[item.Key].abilities.Add(id.id);
// if the card already has the ability then no point and adding it
if (!customCard.abilities.Contains(id.id)) customCard.abilities.Add(id.id);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Comment thread Utils/IdentifierHandlers.cs
@julian-perge
Copy link
Copy Markdown
Contributor Author

@ScottWilson0903 ScottWilson0903 merged commit 8d09d04 into InscryptionModding:main Nov 18, 2021
@julian-perge julian-perge deleted the feature/special_abilities_patchv1 branch November 18, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants